package com.ethink.order.facadeImpl;

import com.ethink.order.api.TocSaleImportJobLogFacade;
import com.ethink.order.api.info.TocSaleImportJobLogInfo;
import com.ethink.order.api.request.TocSaleImportJobLogAddRequest;
import com.ethink.order.service.TocSaleImportJobLogService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 销售单批量导入job处理结果记录表 Facade接口实现
 *
 * @author default
 * @date 2022-12-20
 */
@RestController
@Slf4j
@RequestMapping("order-service/facade/v1/tocSaleImportJobLog")
public class TocSaleImportJobLogFacadeImpl implements TocSaleImportJobLogFacade {

    @Autowired
    private TocSaleImportJobLogService tocSaleImportJobLogService;


    @Override
    public Integer add(TocSaleImportJobLogAddRequest addRequest) {
        return tocSaleImportJobLogService.add(addRequest);
    }

    @Override
    public List<TocSaleImportJobLogInfo> queryLogByLogId(Long logId) {
        return tocSaleImportJobLogService.queryLogByLogId(logId);
    }

    @Override
    public Integer processTocSaleImportJobLog(Long id) {
        return tocSaleImportJobLogService.processTocSaleImportJobLog(id);
    }

    @Override
    public List<TocSaleImportJobLogInfo> queryFailureLogs(Long id) {
        return tocSaleImportJobLogService.queryFailureLogs(id);
    }

    @Override
    public Integer updateByShopNoAndLogId(TocSaleImportJobLogAddRequest updateRequest) {
        return tocSaleImportJobLogService.updateByShopNoAndLogId(updateRequest);
    }
}